package com.school.sports.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.school.sports.entity.Rank;
import com.school.sports.mapper.RankMapper;
import com.school.sports.service.RankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class RankServiceImpl extends ServiceImpl<RankMapper, Rank> implements RankService {

    @Autowired
    private RankMapper rankMapper;

    @Override
    public List<Rank> getRankWithRelations(Long projectId) {
        return rankMapper.selectRankWithRelations(projectId);
    }

    @Override
    public List<Rank> getAllRankWithRelations() {
        return rankMapper.selectAllRankWithRelations();
    }

    @Override
    public Rank getRankByIdWithRelations(Long id) {
        return rankMapper.selectByIdWithRelations(id);
    }
}